EMT Practice Test

1. Question Content...


Question List

Question1: Terraform variable names are saved in the state file.

Question2: You have multiple team members collaborating on infrastructure as code (IaC) using Terraform, and want to apply formatting standards for readability.
How can you format Terraform HCL (HashiCorp Configuration Language) code according to standard Terraform style convention?

Question3: How do you specify a module's version when publishing it to the public terraform Module Registry?

Question4: Running terraform fmt without any flags in a directory with Terraform configuration files check the formatting of those files without changing their contents.

Question5: Outside of the required_providers block, Terraform configurations always refer to providers by their local names.

Question6: You have never used Terraform before and would like to test it out using a shared team account for a cloud provider. The shared team account already contains 15 virtual machines (VM). You develop a Terraform configuration containing one VM. perform terraform apply, and see that your VM was created successfully. What should you do to delete the newly-created VM with Terraform?

Question7: HashiCorp Configuration Language (HCL) supports user-denned functions.

Question8: Which configuration consistency errors does terraform validate report?

Question9: What type of block is used to construct a collection of nested configuration blocks?

Question10: You are writing a child Terraform module that provisions an AWS instance. You want to reference the IP address returned by the child module in the root configuration. You name the instance resource "main'.
Which of these is the correct way to define the output value?

Question11: You have a Terraform configuration that defines a single virtual machine with no references to it, You have run terraform apply to create the resource, and then removed the resource definition from your Terraform configuration file.
What will happen you run terraform apply in the working directory again?

Question12: A terraform apply can not _________ infrastructure.

Question13: How would you output returned values from a child module in the Terraform CLI output?

Question14: Your security team scanned some Terraform workspaces and found secrets stored in plaintext in state files. How can you protect that data?

Question15: Which of these statements about Terraform Cloud workspaces is false?

Question16: Variables declared within a module are accessible outside of the module.

Question17: Which Terraform collection type should you use to store key/value pairs?

Question18: When using multiple configuration of the same Terraform provider, what meta-argument must you include in any non-default provider configurations?

Question19: Which command lets you experiment with terraform expressions?

Question20: Which parameters does terraform import require? Choose two correct answers.

Question21: What is the name of the default file where Terraform stores the state?
Type your answer in the field provided. The text field is not case-sensitive and all variations of the correct answer are accepted.

Question22: Your DevOps team is currently using the local backend for your Terraform configuration. You would like to move to a remote backend to store the state file in a central location. Which of the following backends would not work?

Question23: What feature stops multiple users from operating on the Terraform state at the same time?

Question24: Where can Terraform not load a provider from?

Question25: When using a remote backend or terraform Cloud integration, where does Terraform save resource sate?

Question26: Which task does terraform init not perform?

Question27: A developer on your team is going lo leaf down an existing deployment managed by Terraform and deploy a new one. However, there is a server resource named aws instant.ubuntu[l] they would like to keep. What command should they use to tell Terraform to stop managing that specific resource?

Question28: You much initialize your working directory before running terraform validate.

Question29: What is the workflow for deploying new infrastructure with Terraform?

Question30: You have created a main.tf Terraform configuration consisting of an application server, a database and a load balanced. You ran terraform apply and Terraform created all of the resources successfully.
Now you realize that you do not actually need the load balancer, so you run terraform destroy without any flags. What will happen?

Question31: Terraform configuration (including any module references) can contain only one Terraform provider type.

Question32: In a Terraform Cloud workpace linked to a version control repository speculative plan rum start automatically commit changes to version control.

Question33: You can configure Terraform to log to a file using the TF_LOG environment variable.

Question34: You add a new provider to your configuration and immediately run terraform apply in the CD using the local backend. Why does the apply fail?

Question35: You're building a CI/CD (continuous integration/continuous delivery) pipeline and need to inject sensitive variables into your Terraform run. How can you do this safely?

Question36: Which two steps are required to provision new infrastructure in the Terraform workflow? Choose two correct answers.

Question37: When should you use the force-unlock command?

Question38: Only the user that generated a plan may apply it.

Question39: Which command must you first run before performing further Terraform operations in a working directory?

Question40: When should you run terraform init?

Question41: If a DevOps team adopts AWS CloudFormation as their standardized method for provisioning public cloud resoruces, which of the following scenarios poses a challenge for this team?

Question42: You want to know from which paths Terraform is loading providers referenced in your Terraform configuration (* files). You need to enable additional logging messages to find this out. Which of the following would achieve this?

Question43: What is one disadvantage of using dynamic blocks in Terraform?

Question44: Your risk management organization requires that new AWS S3 buckets must be private and encrypted at rest. How can Terraform Cloud automatically and proactively enforce this security control?

Question45: Once you configure a new Terraform backend with a terraform code block, which command(s) should you use to migrate the state file?

Question46: Which backend does the Terraform CU use by default?

Question47: Which of the following is not a valid siring function in Terraform?

Question48: When using Terraform to deploy resources into Azure, which scenarios are true regarding state files? (Choose two.)

Question49: Which of the following ate advantages of using infrastructure as code (laC) instead of provisioning with a graphical user interface (GUI)? Choose two correct answers.

Question50: Setting the TF_LOG environment variable to DEBUG causes debug messages to be logged into stdout.

Question51: Which of these ate secure options for storing secrets for connecting to a Terraform remote backend? Choose two correct answers.

Question52: How is terraform import run?

Question53: One remote backend configuration always maps to a single remote workspace.

Question54: Which of the following methods, used to provision resources into a public cloud, demonstrates the concept of infrastructure as code?

Question55: Which of these ate features of Terraform Cloud? Choose two correct answers.

Question56: Module version is required to reference a module on the Terraform Module Registry.

Question57: What kind of configuration block will create an infrastructure object with settings specified within the block?

Question58: You want to define a single input variable to capture configuration values for a server. The values must represent memory as a number, and the server name as a string.
Which variable type could you use for this input?